﻿using System.Collections.ObjectModel;
using Dsl.Ped.Common;

namespace Dsl.Ped.Framework.Projections.CollectionProjections.Vertical
{
    /// <summary>
    /// View Model of the VerticalProjection projection
    /// </summary>
    public class VerticalProjectionModel<T> : ViewModelBase
    {
        #region Fields

        /// <summary>
        /// Objects which are projected in a collection
        /// </summary>
        private ObservableCollection<T> items;

        #endregion

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="VerticalProjectionModel{T}"/> class.
        /// </summary>
        /// <param name="items">Items to display vertically</param>
        public VerticalProjectionModel(ObservableCollection<T> items) {

            this.items = items;
        }

        #endregion

        #region Members

        /// <summary>
        /// Gets or sets items which are projected in a collection
        /// </summary>
        public ObservableCollection<T> Items
        {
            get
            {
                return items;
            }
            set
            {
                items = value;
                RaisePropertyChanged(() => Items);
            }
        }
        
        #endregion
    }
}
